const Login = () => import('@/views/login/login')
const Home = () => import('@/views/home/home')
const Profile = () => import('@/views/profile/profile')
const Category = () => import('@/views/category/category')
const NotFound = () => import('@/views/notfound/notFound')
const routes = [{
    path: '/',
    redirect: '/home' // 重定向
  },
  {
    path: '/login',
    name: 'login',
    component: Login,
    meta: {
      title: '登录页面',
      keepAlive: false
    },
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    meta: {
      title: '页面1',
      keepAlive: false
    },
  },
  {
    path: '/profile',
    name: 'profile',
    component: Profile,
    meta: {
      title: '页面1',
      keepAlive: false
    },
  },
  {
    path: '/category',
    name: 'category',
    component: Category,
    meta: {
      title: '页面2',
      keepAlive: false
    },
  },
  {
    path: '*',
    name: 'notFound',
    meta: {
      title: '没有这个页面',
      keepAlive: true
    },
    component: NotFound
  }
]

export default routes